package com.zsy.service.Impl;

import com.zsy.mapper.UserMapper;
import com.zsy.pojo.User;
import com.zsy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByUserName(String username) {
        User u = userMapper.findByUserName(username);
        return u;
    }

    @Override
    public void register(String username, String password, String email) {
        userMapper.add(username, password, email);
    }

    @Override
    public void userPwdService(String newPwd,String username) {
        userMapper.userPwdService(newPwd,username);
    }
}
